package com.example.bruger.androidneurosky;

import android.os.AsyncTask;

/**
 * Created by kimmoandersen on 09/04/15.
 */
public class AsyncConnector extends AsyncTask<MainMenuActivity, Void, Void> {

    TGHandler handler;
    MainMenuActivity activity;

    public AsyncConnector(TGHandler handler) {
        this.handler = handler;
    }

    protected Void doInBackground(MainMenuActivity...params) {
        activity = params[0];
        handler.Start(activity);
        return null;
    }

    @Override
    protected void onPostExecute(Void nothing) {
        activity.DeviceConnected();
    }
}
